package org.mixed.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.UUID;

@Getter
@Setter
@ConfigurationProperties(prefix = "mix")
public class MixProperties {
    private String instanceId = UUID.randomUUID().toString();
    @NestedConfigurationProperty
    private MixStorage storage = new MixStorage();
    private String prefix;
    private String web = "/mix/web";
    private String editorConfig;
    @NestedConfigurationProperty
    private Security security = new Security();
    private String channel = "magic-api:notify:channel";

    @Getter
    @Setter
    public static class Security {
        private String username;
        private String password;
    }
}
